import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:imember/UI/Summary/SummaryCount.dart';
import 'package:imember/Util/Global.dart';
import 'package:imember/Util/MyColor.dart';
import 'package:imember/Util/PageUtil.dart';
import 'package:imember/Widget/MyButton.dart';
import 'package:imember/Widget/MyInput.dart';
import 'package:imember/Widget/MyPage.dart';

class DiscountPsw extends StatefulWidget {

  Function() onVerSuccess;

  DiscountPsw({required this.onVerSuccess});

  @override
  State<StatefulWidget> createState() {
    return DiscountPswState();
  }
}

class DiscountPswState extends State<DiscountPsw> {
  confirmClick() {
    widget.onVerSuccess();
    PageUtil().back(context);
  }

  @override
  Widget build(BuildContext context) {
    return MyPage(Container(
        alignment: Alignment.center,
        child: Column(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [
          Text("請輸入六位數密碼", style: TextStyle(fontSize: 30, color: MyColor.Orange)),
          Container(
            width: 368,
            height: 49,
            decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(25)),
              border: Border.all(color:MyColor.Orange, width: 2),
            ),
            margin: EdgeInsets.fromLTRB(0, 19, 0, 35),
            padding: EdgeInsets.fromLTRB(18, 0, 18, 0),
            child: NormalInput(fontSize: 20, inputType: NormalInput.NumberPassword),
          ),
          OrangeBtn("確認", width: 72, height: 38, radius: 20,fontSize: 15, onTap: confirmClick)
        ])));
  }
}
